import axios from 'axios';
import {funAxios} from "./funAxios";

/*客户端  账号密码 base64*/
export const clientID= 'cGlnOnBpZw==';// 'dGVzdDI6dGVzdDI=' test2:test2 ||  'd2ViOndlYg==' web:web  || 'dGVzdDp0ZXN0' test:test  ||  cGlnOnBpZw== pig:pig

// 前端服务器地址
export const webHost= 'http://localhost:8189';
// export const webHost= '';
//export const webHost= 'http://193.112.49.253:15680';// 正式环境外网地址配置

// api 管理
export const  apiServer = '/api';

//后台请求入口地址
//不用写死的地址方法
// export const  developUrl = '';
// export const serverDK ='/servicemanage/';
// export const serverNumberPork = '';
// export const serverUrlNumberPork = developUrl + serverNumberPork;    //不用端口号

//写死地址的方法
export const  developUrl = 'http://192.168.0.214:';
// export const  developUrl = 'http://192.168.0.233:';
export const serverDK ='8784/servicemanage/';
export const serverNumberPork = '8784';
export const serverUrlNumberPork = developUrl + serverNumberPork;


// 统一网关地址
export const zuulHost= serverUrlNumberPork;

// app应用市场管理模块
// 数据管理
export const  marketDataBaseServer = '/m_dataBase';
// 市场管理
export const  marketManageServer = '/m_manage';
// 门户平台
export const  marketPlatformServer = '/m_platform';
// 开发
export const  markerDevelopersServer = '/m_developers';

// 统一用户管理 模块
export const  uamServer  = '/uaa';

// token URI
export const tokenUri= zuulHost+uamServer+"/oauth/token";
/*登录*/
export const getToken  = params => { return axios({
    url:tokenUri
    ,method:"POST"
    ,data:params
    ,headers: {'Authorization': 'Basic '+clientID,"Content-Type":"application/x-www-form-urlencoded"}
}) };

// export const getDictionaryList = params => { return funAxios("POST",zuulHost+uamServer+'/dictionary/list', params ).then(res => res); };
export const initDictionaryList = params => { return axios({
    url:zuulHost+uamServer+'/dictionary/list'+params.access_token
    ,method:"POST"
    ,data:params.data
    ,headers: {"Content-Type":"application/json"}
}) };

// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  api 管理 start  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// provicer 操作
export const pro_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/provider/searchByCondition', params ) };
export const pro_add = params => { return funAxios("POST",zuulHost+apiServer+'/provider', params ).then(res => res); };
export const pro_update = params => { return funAxios("PUT",zuulHost+apiServer+'/provider', params ).then(res => res); };
export const pro_del = id => { return funAxios("DELETE",zuulHost+apiServer+'/provider/'+id ).then(res => res); };
export const pro_countByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/provider/countByCondition',params ).then(res => res); };
export const pro_serverInformationSearch = params => { return funAxios("POST",zuulHost+apiServer+'/providerServiceHost/searchByCondition',params ).then(res => res); };
export const pro_serverInformationAdd = params => { return funAxios("POST",zuulHost+apiServer+'/providerServiceHost', params ).then(res => res); };
export const pro_providerServiceMonitorSearch = params => { return funAxios("POST",zuulHost+apiServer+'/providerServiceMonitor/searchByCondition', params ).then(res => res); };
// serviceHistory 操作
export const serHis_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/serviceHistory/searchByCondition', params ).then(res => res); };
// serviceInfo 操作
export const ser_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/searchByCondition', params ).then(res => res); };
export const ser_add = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo', params ).then(res => res); };
export const ser_update = params => { return funAxios("PUT",zuulHost+apiServer+'/serviceInfo', params ).then(res => res); };
export const ser_del = id => { return funAxios("DELETE",zuulHost+apiServer+'/serviceInfo/'+id ).then(res => res); };
export const ser_check = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/check',params ).then(res => res); };
export const ser_changeOnLineStatus = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/changeOnLineStatus',params ).then(res => res); };
export const ser_countByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/countByCondition',params ).then(res => res); };
export const ser_countAllService = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/countAllService',params ).then(res => res.data); };
export const ser_countTodayService = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/countTodayService',params ).then(res => res.data); };
export const ser_countByLoction = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/serviceInfoCountByLoction',params ).then(res => res.data); };
export const serPro_searchServiceAndProviderByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/serviceInfo/searchServiceAndProvider', params ).then(res => res); };
// requester 操作
export const req_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/requester/searchByCondition',params ).then(res => res); };
export const req_add = params => { return funAxios("POST",zuulHost+apiServer+'/requester', params ).then(res => res); };
export const req_update = params => { return funAxios("PUT",zuulHost+apiServer+'/requester', params ).then(res => res); };
export const req_del = id => { return funAxios("DELETE",zuulHost+apiServer+'/requester/'+id ).then(res => res); };
export const req_check = params => { return funAxios("POST",zuulHost+apiServer+'/requester/check',params ).then(res => res); };
export const req_countByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/requester/countByCondition',params ).then(res => res); };
export const req_countByOrganization = params => { return funAxios("POST",zuulHost+apiServer+'/requester/requesterCountByOrganization',params ).then(res => res.data); };
export const req_monthlyRequesterCount = params => { return funAxios("POST",zuulHost+apiServer+'/requester/monthlyRequesterCount',params ).then(res => res.data); };
export const req_dayRequesterCount = params => { return funAxios("POST",zuulHost+apiServer+'/interfaceFlow/searchGather',params ).then(res => res.data); };
export const req_dayServiceCount = params => { return funAxios("POST",zuulHost+apiServer+'/interfaceFlow/searchGather',params ).then(res => res.data); };
export const req_seachUserByCurrent = params => { return funAxios("POST",zuulHost+apiServer+'/requester/seachUserByCurrent',params ).then(res => res); };
// serviceRequseterAssociation 操作
export const assoc_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/serviceRequesterAssociation/searchByCondition',params ).then(res => res); };
export const assoc_add = params => { return funAxios("POST",zuulHost+apiServer+'/serviceRequesterAssociation', params ).then(res => res); };
// 关联关系一般情况没修改的必要
export const assoc_update = params => { return funAxios("PUT",zuulHost+apiServer+'/serviceRequesterAssociation', params ).then(res => res); };
export const assoc_del = (requesterId,serviceId) => { return funAxios("DELETE",zuulHost+apiServer+'/serviceRequesterAssociation/'+requesterId+'/'+serviceId ).then(res => res); };
export const assoc_check = params => { return funAxios("POST",zuulHost+apiServer+'/serviceRequesterAssociation/check',params ).then(res => res); };

// InvokLog 操作
export const invoLog_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/invokLog/searchByCondition',params ).then(res => res); };
export const invoLog_del = id => { return funAxios("DELETE",zuulHost+apiServer+'/invokLog/'+id ).then(res => res); };
export const invoLog_countByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/invokLog/countByCondition',params ).then(res => res); };
export const invoLog_searchServiceQualityMonitoring = params => { return funAxios("POST",zuulHost+apiServer+'/invokLog/searchServiceQualityMonitoring',params ).then(res => res); };
//服务频率监控
export const invoLog_getServiceFrequencyMonitoring = params => { return funAxios("POST",zuulHost+apiServer+'/invokLog/getServiceFrequencyMonitoring',params ).then(res => res); };
//接口流量统计
export const getInterfaceFlowList = params => { return funAxios("POST",zuulHost+apiServer+'/interfaceFlow/search',params ).then(res => res); };
export const getServiceApiMonitorList = params => { return funAxios("POST",zuulHost+apiServer+'/serverApiMonitor/search',params ).then(res => res); };

// OperationLog 操作
export const operLog_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/operationLog/searchByCondition',params ).then(res => res); };
export const operLog_del = id => { return funAxios("DELETE",zuulHost+apiServer+'/operationLog/'+id ).then(res => res); };

// Dictionary 操作
export const dict_getRootListByType = params => {return funAxios("POST",zuulHost+apiServer+'/dictionary/getRootListByType',params ).then(res => res);};
export const dict_getSubNodeListByPid = params => {return funAxios("POST",zuulHost+apiServer+'/dictionary/getSubNodeListByPid',params ).then(res => res);};

//accesscontrol 操作
export const acc_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/accessController/searchByCondition', params ).then(res => res); };
export const acc_getAccessCtrlInfo = params => { return funAxios("POST",zuulHost+apiServer+'/accessController/getInfoByServiceId', params ).then(res => res); };
export const acc_add = params => { return funAxios("POST",zuulHost+apiServer+'/accessController/addAccInfo', params ).then(res => res); };
export const cusAcc_searchByCondition = params => { return funAxios("POST",zuulHost+apiServer+'/customController/searchByCondition', params ).then(res => res); };
export const cusAcc_getInfo = params => { return funAxios("POST",zuulHost+apiServer+'/customController/getInfoBySerAndReqId', params ).then(res => res); };
export const cus_acc_add = params => { return funAxios("POST",zuulHost+apiServer+'/customController/addCusAccInfo', params ).then(res => res); };
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  api 管理 end  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  应用市场基础管理 start  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// Market 操作
//根据条件获取列表
export const getMarketList = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/condition', params ).then(res => res.data); };
//添加
export const addMarket = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/addMarket', params ).then(res => res.data); };
//修改
export const editMarket = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/editMarket', params ).then(res => res.data); };
//删除
export const deleteMarket = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/deleteMarket', params ).then(res => res.data); };
//查询行政区划tree
export const getAreaList = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/getAreaList', params ).then(res => res.data); };
export const updateMarketOrg = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/org/update', params ).then(res => res); };
export const marketOrgSearch = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/org/list', params ).then(res => res); };
export const getOrgNameByRole = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/getOrgNameByRole', params ).then(res => res); };
// application-type 操作
//根据条件获取列表
export const getApplicationTypeList = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/applicationType/condition', params ).then(res => res.data); };
export const addApplicationType = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/applicationType/addApplicationType', params ,"multipart/form-data").then(res => res.data); };
//修改
export const editApplicationType = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/applicationType/editApplicationType', params ).then(res => res.data); };
//删除
export const deleteApplicationType = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/applicationType/deleteApplicationType', params ).then(res => res.data); };
// supplier 操作
//根据条件获取列表
export const getSupplierList = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplier/condition', params ).then(res => res.data); };
//添加
export const addSupplier = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplier/addSupplier', params ).then(res => res.data); };
//修改
export const editSupplier = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplier/editSupplier', params ).then(res => res.data); };
//删除
export const deleteSupplier = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplier/deleteSupplier', params ).then(res => res.data); };
// 分配用户
//获取已有权限的用户列表
export const getSupplierUserList = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplierAllocation/getSupplierUserList', params ).then(res => res.data); };
//获取已有权限的市场列表
export const getSupplierMarketList = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplierAllocation/getSupplierMarketList', params ).then(res => res.data); };
//获取已有权限的供应商列表
export const getSupplierSupplierList = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplierAllocation/getSupplierSupplierList', params ).then(res => res.data); };
//分配用户/市场/关联供应商
export const distribution = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplierAllocation/distribution', params ).then(res => res.data); };
//删除关联 用户关联
export const deletesupplierAllocationByUser = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplierAllocation/deleteUser', params ).then(res => res.data); };
//删除关联 市场关联
export const deletesupplierAllocationByMarket = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplierAllocation/deleteMarket', params ).then(res => res.data); };
//删除关联 供应商关联
export const deletesupplierAllocationBySupperlier = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplierAllocation/deleteSupplier', params ).then(res => res.data); };
//关联查询  找出供应商已有权限的用户和未有权限的用户
export const getUserListBySupplier = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/user/getListBySupplier', params ).then(res => res.data); };
//关联查询  找出供应商已有权限的市场和未有权限的市场
export const getMarketListBySupplier = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/getListBySupplier', params ).then(res => res.data); };
//关联查询  找出供应商已有权限的供应商和未有权限的供应商
export const getSupplierListBySupplier = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/supplier/getListBySupplier', params ).then(res => res.data); };
// file 文件操作
export const uploadFile = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/file/upload', params,{headers:{'Content-Type':'multipart/form-data'}} ).then(res => res.data); };
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  应用市场基础管理 end  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

//根据条件获取列表
export const getAppList = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/appList', params ).then(res => res.data); };
export const getAppList_new = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/appList_new', params ).then(res => res.data); };
export const getExtendList = params => { return funAxios("POST",zuulHost+marketManageServer+'/appExtendInfo', params ).then(res => res.data); };
export const getApiList = params => { return funAxios("POST",zuulHost+marketManageServer+'/apiInterface/list', params ).then(res => res.data); };
export const searchApimanageService = params => { return funAxios("POST",zuulHost+marketManageServer+'/apiInterface/searchApimanageService', params ).then(res => res); };
export const versionList = params => { return funAxios("POST",zuulHost+marketManageServer+'/versionInfo/versionList', params ).then(res => res.data); };
//添加
export const createApi = params => { return funAxios("POST",zuulHost+marketManageServer+'/apiInterface/create', params ).then(res => res.data); };
export const createVersion = params => { return funAxios("POST",zuulHost+marketManageServer+'/versionInfo/create', params ).then(res => res.data); };
export const updateVersion = params => { return funAxios("POST",zuulHost+marketManageServer+'/versionInfo/update', params ).then(res => res.data); };
export const addApp = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/add', params ).then(res => res.data); };
export const deleteAllAppInfo = appCode => { return funAxios("DELETE",zuulHost+marketManageServer+'/appBaseInfo/deleteAllAppInfo/'+appCode ).then(res => res); };
//修改
export const editApp = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/update', params ).then(res => res.data); };
export const editApi = params => { return funAxios("POST",zuulHost+marketManageServer+'/apiInterface/update', params ).then(res => res.data); };
//删除
export const deleteApi = params => { return funAxios("POST",zuulHost+marketManageServer+'/apiInterface/remove', params ).then(res => res.data); };
// export const deleteMarket = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/deleteMarket', params ).then(res => res.data); };
export const publishMarket = params => { return funAxios("POST",zuulHost+marketManageServer+'/publishMarket/marketList', params ).then(res => res.data); };
export const getAllPublishMarket = params => { return funAxios("POST",zuulHost+marketManageServer+'/publishMarket/getAll', params ).then(res => res.data); };
export const addPublishMarket = params => { return funAxios("POST",zuulHost+marketManageServer+'/publishMarket/create', params ).then(res => res.data); };// 添加发布市场
export const addPublishMarkets = params => { return funAxios("POST",zuulHost+marketManageServer+'/publishMarket/creates', params ).then(res => res.data); };// 添加发布市场s
export const removeMarket = params => { return funAxios("POST",zuulHost+marketManageServer+'/publishMarket/remove', params ).then(res => res.data); };
export const getpublishMarketList = params => { return funAxios("POST",zuulHost+marketManageServer+'/publishMarket/list', params ).then(res => res.data); };
export const sendObj = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/publish', params ).then(res => res.data); };
export const taskList = params => { return funAxios("POST",zuulHost+marketManageServer+'/syncMission/taskList', params ).then(res => res.data); };
export const addAuth = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/create', params ).then(res => res.data); };
export const delAuth = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/remove', params ).then(res => res.data); };
export const getAuth = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/list', params ).then(res => res.data); };
export const doAuthDept = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/deptFromAuth', params ).then(res => res); };
export const deptList = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/deptList', params ).then(res => res); };
export const userList = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/userList', params ).then(res => res); };
export const appList = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/appList', params ).then(res => res); };
export const AuthUser = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/authToUser', params ).then(res => res); };
export const cancleAuthUser = params => { return funAxios("POST",zuulHost+marketManageServer+'/authorize/cancleAuthToUser', params ).then(res => res); };
//市场发布的应用审核列表
export const appBasePublishSearch = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/publish/search', params ).then(res => res); };
export const publishMarketUpdateVerify = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/verify', params ).then(res => res); };
//市场发布的应用版本审核列表
export const marketPublishVerifySearch = params => { return funAxios("POST",zuulHost+marketManageServer+'/appBaseInfo/publish/verify/search', params ).then(res => res); };
// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  应用市场管理 end  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

// >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  统一用户管理 start  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
//根据条件获取部门列表
export const getOrganizationList = params => { return funAxios("POST",zuulHost+uamServer+'/organization/queryByCondition', params ).then(res => res); };
export const getMyOrgsList = params => { return funAxios("POST",zuulHost+uamServer+'/organization/myOrgs', params ).then(res => res); };
//添加部门
export const addOrganization = params => { return funAxios("POST",zuulHost+uamServer+'/organization/save', params ).then(res => res); };
//修改部门
export const editOrganization = params => { return funAxios("POST",zuulHost+uamServer+'/organization/update', params ).then(res => res); };
//删除部门
export const deleteOrganization = orgId => { return funAxios("POST",zuulHost+uamServer+'/organization/delete/'+orgId+'' ).then(res => res); };
//根据条件获取角色列表
export const getRoleList = params => { return funAxios("POST",zuulHost+uamServer+'/role/list', params ).then(res => res); };
//添加角色
export const addRole = params => { return funAxios("POST",zuulHost+uamServer+'/role/save', params ).then(res => res); };
//编辑角色
export const editRole = params => { return funAxios("POST",zuulHost+uamServer+'/role/update', params ).then(res => res); };
//删除角色
export const deleteRole = id => { return funAxios("POST",zuulHost+uamServer+'/role/del/'+id+'' ).then(res => res); };
// 按给定条件搜索权限信息（资源）
export const searchPermission = params => { return funAxios("POST",zuulHost+uamServer+'/permission/search', params ) };
// 查询某角色 的权限列表（资源）
export const getRolePermissions = params => { return funAxios("POST",zuulHost+uamServer+'/permission/searchByRoleId/'+params,{} ) };
// 更新某个角色的资源权限
export const addPermissionsForRole = params => { return funAxios("POST",zuulHost+uamServer+'/permission/addForRole/',params ) };
//查询权限树
export const searchRolePermissionTree = params => {return funAxios("POST",zuulHost+uamServer+"/permission/tree/",params)};
//获取用户列表
export const getUserList = params => { return funAxios("POST",zuulHost+uamServer+'/user/list', params ).then(res => res.data); };
//获取 自己的 用户列表
export const getMyUserlist = params => { return funAxios("POST",zuulHost+uamServer+'/user/myUserlist', params ).then(res => res.data); };
//获取部门tree
export const getree = params => { return funAxios("POST",zuulHost+uamServer+'/organization/tree', params ).then(res => res.data); };
//获取一二级部门tree
export const getPcTree = params => { return funAxios("POST",zuulHost+uamServer+'/organization/pcTree', params ).then(res => res.data); };
//获取我的部门tree
export const geMytree = params => { return funAxios("POST",zuulHost+uamServer+'/organization/mytree', params ).then(res => res.data); };
//添加用户
export const addUser = params => { return funAxios("POST",zuulHost+uamServer+'/user/save', params ).then(res => res); };
//修改用户
export const editUser = params => { return funAxios("POST",zuulHost+uamServer+'/user/update', params ).then(res => res); };
//删除用户
export const deleteUser = id => { return funAxios("POST",zuulHost+uamServer+'/user/del/'+id+'' ).then(res => res); };
//获取部门已授权用户数据
export const departmentHave = params => { return funAxios("POST",zuulHost+uamServer+'/organization/searchByUserId', params ).then(res => res); };
//授权部门给用户
export const departmentAuthorization = params => { return funAxios("POST",zuulHost+uamServer+'/organization/updateOrgsForUser', params ).then(res => res); };
//获取角色已授权用户数据
export const roleHave = id => { return funAxios("POST",zuulHost+uamServer+'/role/searchByuserId/'+id+'' ).then(res => res); };
//授权角色给用户
export const addRolesForUser = params => { return funAxios("POST",zuulHost+uamServer+'/role/addRolesForUser', params ).then(res => res); };
//获取字典列表
export const getDictionaryList = params => { return funAxios("POST",zuulHost+uamServer+'/dictionary/list', params ).then(res => res); };
export const getDictionaryTree = params => { return funAxios("POST",zuulHost+uamServer+'/dictionary/tree', params ).then(res => res.data); };
//新增字典
export const addDictionary = params => { return funAxios("POST",zuulHost+uamServer+'/dictionary/save', params ).then(res => res); };
//修改字典
export const updateDictionary = params => { return funAxios("POST",zuulHost+uamServer+'/dictionary/update', params ).then(res => res); };
//删除字典
export const deleteDictionary = id => { return funAxios("POST",zuulHost+uamServer+'/dictionary/delete/'+id+'' ).then(res => res); };
//查询所有菜单
export const getMenuList = params => { return funAxios("POST",zuulHost+uamServer+'/menu/getList', params ).then(res => res); };
//查询已有权限的菜单
export const searchMenuTreeByuserId = id => { return funAxios("POST",zuulHost+uamServer+'/menu/searchMenuTreeByuserId/'+id+'' ).then(res => res); };
//菜单授权给用户
export const addMenuForUser = params => { return funAxios("POST",zuulHost+uamServer+'/userMenu/addMenuForUser', params ).then(res => res); };
//部门查询已授权角色
export const roleOrgSeach = params => { return funAxios("POST",zuulHost+uamServer+'/role/org/search', params ).then(res => res); };
//部门授权角色
export const roleOrgUpdate = params => { return funAxios("POST",zuulHost+uamServer+'/role/org/update', params ).then(res => res); };
//部门查询已授权警种
export const policeeOrgSeach = params => { return funAxios("POST",zuulHost+uamServer+'/dictionary/org/search', params ).then(res => res); };
//部门授权警种
export const policeeOrgUpdate = params => { return funAxios("POST",zuulHost+uamServer+'/dictionary/org/update', params ).then(res => res); };
//应用授权
//市场发布的应用查询
export const marketPublishSearch = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/publish/search', params ).then(res => res); };
//授权管理列表
export const marketNotPageSerach = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/appAuthorization/notPageSerach', params ).then(res => res); };
//授权列表（不分页）
export const marketAuthorizationSearch = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/appAuthorization/search', params ).then(res => res); };
//授权删除
export const marketAuthorizationDelete = id => { return funAxios("DELETE",zuulHost+marketDataBaseServer+'/appAuthorization/delete/'+id ).then(res => res); };
//授权
export const marketAuthorizationCreate = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/appAuthorization/createAll', params ).then(res => res); };
//市场部门关联tree
export const marketOrgTree = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/org/tree/search', params ).then(res => res); };
//市场部门列表
export const marketOrgSearch2 = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/org/obj/search', params ).then(res => res); };
//市场部門角色列表
export const marketRoleSearch = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/org/role/search', params ).then(res => res); };
//市场部門警种列表
export const marketPoliceSearch = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/org/dictionary/search', params ).then(res => res); };
//市场部門用户列表
export const marketUserSearch = params => { return funAxios("POST",zuulHost+marketDataBaseServer+'/market/org/user/search', params ).then(res => res); };
//应用同步日志列表
export const synchLog = params => { return funAxios("POST",data/synchLog.json, params ).then(res => res); };


//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>以下是智能数据交换云平台API接口>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
